home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
comm
/
cnet
/
gu40pack.lha
/
gu40pack
/
OFFSET_Scanner
< prev
next >
Wrap
Text File
|
1997-03-21
|
7KB
|
105 lines
/**************************************************************************\
$VER: OFFSET Scanner, v2.10 (19-Mar-97) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;qu=query
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos("/",fp),lastpos(":",fp)))
changewhere "OFFSET Scanner" ; oldwh=result ; bkfile=df"OFFSET_BookMarks"
off2=0 ; bk.=1 ; call READBMARKS ; get=1 ; ctr=0 ; hi=1 ; move=1 ; inc=1
START:
tr "f1c8::: cbOFFSET caScanner cb"ver" c8::: cdBy Dotoran c8:::n1"
qu "c6Start cbOFFSET c6Value c7<caENTERc7=ca"right(defoff,7,"0")"c7>c6: ca" ; off=result
qu "c6Enter Your c9TEST c6String c7<caENTERc7=caXXXc7>c6: ca" ; test=result ; if test="" then test="XXX"
qu "c6Load This cdSCRATCH c6Buffer c7<caENTERc7=ca2c7>c6: ca" ; scra=result ; if scra="" then scra=2
loadscratch scra ; savescratch (-scra) ; if off="" | datatype(off,"n")=0 then off=defoff
se "c6Do You Want to View cfMENU c6Now? c7[caNoc7]c6: ca" ; gc ; a=result
if a="Y" then do ; tr "Yes." ; call MENU ; end
else tr "No.n2c6Use cdHc6, cdMc6, cd/c6, or cd? c6to View cfMenuc6.n1"
START2:
if get=1 then gu off ; if get=2 then gs off
a=result ; tr "cb"substr("us",get,1)" c6"right(off,7,"0")"c7: ca"a
if index(a,test)>0 then do ; ctr=hi ; if hi>10 then hi=10 ; end
ctr=ctr+1 ; off2=off ; off=off+move*inc ; if off<1 then do ; move=1
inc=1 ; off=1 ; signal START2 ; end
if ctr<hi then signal START2
START3:
se "cf->ca" ; gc ; b=result ; d1=0
if index("/?HM",b)~=0 then do ; tr "Menu" ; call MENU ; signal START3 ; end
if b="E" then do ; se "c6Entering cbSleep Test c6Mode.n1cb"substr("us",get,1)" sc6"
se right(off,7,"0")"c7: c6Scanning for cb"ca"test"cb"c6..." ; signal START4 ; end
if b="Q" then do ; se "h2cdQ c6to cdQuitc7: ca" ; gc ; a=result ; end
if b="D" then do ; qu "h2c6Dc7:ca" ; hi=result ; d1=1 ; end
if b="N" then do ; qu "h2c6Nc7:ca" ; off=result ; d1=1 ; end
if b="T" then do ; qu "h2c6Tc7:ca" ; test=result ; d1=1 ; end
if b="J" then do ; qu "h2c6Jc7:ca" ; inc=result ; off=off+inc-1 ; d1=1 ; end
if b="+" | b="=" then do ; tr "Forwards" ; move=1 ; off=off+2 ; d1=1 ; end
if b="-" then do ; tr "Backwards" ; move=-1 ; off=off-2 ; d1=1 ; end
if b="U" then do ; tr "Use GetUser" ; get=1 ; d1=1 ; end
if b="S" then do ; tr "Use GetScratch" ; get=2 ; d1=1 ; end
if b="C" then do ; tr "Clear Screenf1" ; off=off2 ; signal START2 ; end
if b="V" then do ; se "h2c6Vc7: c2xxxxxca<7i64 2}" ; gu 70 ; a=result
o=left(off,2) ; if a="" then a=o ; off=a||substr(off-1,3) ; d1=1 ; end
if b="O" then do ; se "h2c6Oc7:c2xxcai64 5}" ; gu 70 ; a=result
o=right(off,5) ; if a="" then a=o ; off=left(off,2)||right(a,5,"0") ; d1=1 ; end
if b="P" then do ; se "h2c6Pc7:cai64 3}" ; gu 70 ; scra=result
loadscratch scra ; savescratch (-scra) ; d1=1 ; end
if b="B" then do ; se "h2c6Bc7:ca" ; gc ; z=result
if index("0123456789",z)=0 then do ; se "h2" ; signal START3 ; end
bk.z=off2 ; tr "cdBookMark c7"z" caset to c7`c6"off2"c7'" ; d1=1 ; end
if b="F" then do ; se "h2c6Fc7:ca" ; gc ; z=result
if index("0123456789",z)=0 then do ; se "h2" ; signal START3 ; end
off=bk.z ; tr "Switching to cdBookMark c7"z"ca..." ; signal START2 ; end
if b="|" then do ; tr "Diverting to c7`c6"right(defoff,7,"0")"c7'" ; off=defoff ; signal START2 ; end
if b="L" then do ; se "Current cdBookMark caSettings:n2"
do i=0 to 9 ; if get=1 then gu bk.i ; else gs bk.i
tr "cb"i"c7>c6"right(bk.i,7,"0")"c7: ca"result ; end i ; tr ; d1=1 ; end
if off="" | datatype(off,"n")=0 then off=off2
ctr=0 ; if a="Q" then do ; tr "cdQuit" ; call SAVEBMARKS ; signal BYE ; end ; else se "hb"
if d1=1 then signal START3 ; else se "h2"
signal START2
START4:
if get=1 then gu off ; if get=2 then gs off ; a=result ; se "u"right(off,7,"0")
if index(a,test)>0 then do ; tr "n1cf->c6Exiting cbSleep Test c6Mode."
off=off-5*inc ; hi=7 ; ctr=1 ; signal sTART2 ; end
off=off+move*inc ; if off<1 then do ; tr "n1" ; move=1 ; off=1 ; signal START2 ; end
maygetchar ; if result="NOCHAR" then signal START4 ; else tr
signal START3
MENU:
tr "n1cf->c6Dc7: c6DISPLAY c2This Many OffSets. cf->c6Nc7: c2Specify c6NEW c2Offsetc7(c6???????c7)c2."
tr "cf->c6Vc7: c2New c6VARIABLE c2Typec7(c6??c2xxxxxc7)c2. cf->c6Oc7: c2New c6OFFSET c2Digitsc7(c2xxc6?????c7)c2."
tr "cf->c6Tc7: c2Specify New c6TEST c2String. cf->c6Ec7: c6ENTER c2Sleep Test Mode."
tr "cf->c6+c7: c2Move List c6FORWARDSc2. cf->c6-c7: c2Move List c6BACKWARDSc2."
tr "cf->c6Uc7: c2Use c6GETUSER c2Command. cf->c6Sc7: c2Use c6GETSCRATCH c2Command."
tr "cf->c6Pc7: c6PICK c2New GetScratch User. cf->c6Jc7: c2Specify New c6JUMP c2Value."
tr "cf->c6Bc7: c2Set GetUser c6BOOKMARKc7(c60c7-c69c7)c2. cf->c6Fc7: c6FLIP c2to GetUser BookMarkc7(c60c7-c69c7)c2."
tr "cf->c6Lc7: c6LIST c2GetUser BookMarks. cf->c6Cc7: c6CLEAR c2The Screen Now."
tr "cf->c6Hc7: c2This c6MENUc7(c2Also c6M / ?c7)c2. cf->cdQc7: cdQuit cbScanning c6OffSetsc2.n1"
return
READBMARKS: ; if ~exists(bkfile) then call SAVEBMARKS
call open(f1,bkfile,"r") ; defoff=readln(f1)
do i=0 to 9 ; bk.i=readln(f1) ; end i
call close(f1) ; return
SAVEBMARKS:
call open(f1,bkfile,"w") ; call writeln(f1,off2)
do i=0 to 9 ; call writeln(f1,bk.i) ; end i
call close(f1) ; return
BYE:;changewhere oldwh;exit
CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
logentry "Lost Carrier!!";bufferflush;signal BYE
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush;signal BYE
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/